package com.leantech.android.browser.ui.setting

import android.os.Bundle

import com.leantech.android.browser.R
import com.leantech.android.browser.databinding.ActivityAboutUsBinding
import com.leantech.android.browser.ui.BaseActivity
import com.leantech.android.browser.utils.onThrottleClick
import com.lean.android.ad.core.config.ChannelInfoProvider
import com.leantech.android.browser.BuildConfig
import org.koin.android.ext.android.inject

class AboutUsActivity : BaseActivity() {

    private lateinit var binding: ActivityAboutUsBinding
    private val channelInfoProvider by inject<ChannelInfoProvider>()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityAboutUsBinding.inflate(layoutInflater)
        setContentView(binding.root)

        initView()
    }

    private fun initView() {
        binding.topBar.setTitle(R.string.title_about_us)
        binding.topBar.addLeftBackImageButton().onThrottleClick {
            finish()
        }
        binding.textVersion.text = BuildConfig.VERSION_NAME
        binding.textChannel.text = channelInfoProvider.getChannel()

    }
}